package com.qige.homework;

import java.util.Random;

public class homework6 {
    public static void main(String[] args) {
        /*
        1.生成10个[10,23)之间的随机整数
        提示：分别使用Math.random()和Random类的nextDouble()或nextInt()实现
         */
        Random random = new Random();
        for (int i = 0; i < 10; i++) {
            int n =  random.nextInt(13) + 10;
            System.out.println("n = " + n);
        }
        int[] arr = new int[10];
        for (int i = 0; i < 10; i++) {
            int num = (int) (Math.random() * 13 + 10);
            arr[i] = num;
            System.out.println(arr[i]);
        }
    }
}
